package com.coreJava.test02;

import java.util.concurrent.CountDownLatch;

/**
 * 作者: LCG
 * 日期: 2019/9/3 17:02
 * 描述:
 */
public class MyCountDownRunable implements Runnable {

    private CountDownLatch countDownLatch;

    public MyCountDownRunable(CountDownLatch countDownLatch) {
        this.countDownLatch = countDownLatch;
    }

    @Override
    public void run() {

        for(int i=10;i>=0;i--){
            System.out.println("-----当前线程---"+Thread.currentThread().getName()+"----"+i);
        }
        countDownLatch.countDown();
    }
}
